package com.project.zsxd.server.init;

import com.project.zsxd.server.common.helper.FileHelper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 系统配置初始化
 */
@Component
public class ConfigInitializer implements InitializingBean {

    @Value("${file.upload.dest}")
    private String fileUploadDest;

    @Value("${file.download.url}")
    private String fileDownloadUrl;

    @Override
    public void afterPropertiesSet() {
        FileHelper.FILE_UPLOAD_DEST = fileUploadDest;
        FileHelper.FILE_DOWNLOAD_URL = fileDownloadUrl;
    }
}
